home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / sgml / sgml2latex-format.1.3.tar.Z / sgml2latex-format.1.3.tar / test / test.ascii < prev    next >
Text File  |  1993-03-12  |  8KB  |  421 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.          The qwertz SGML Document Types
  23.  
  24.          (Version 1.1 Reference Manual)
  25.  
  26.  
  27.                    Tom Gordon
  28.  
  29.                The qwertz Project
  30. Institute for Applied Information Technology (F3)
  31.  
  32.  
  33.          German National Research Center
  34.            for Computer Science (GMD)
  35.  
  36.                 January 27, 1993
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. Chapter 1
  49.  
  50.  
  51.  
  52. Why Not Just Use LaTeX?
  53.  
  54.  
  55.  
  56. The qwertz document types  are a set  of Standard Generalized  Markup
  57. Language  (SGML)  document  type  definitions  (DTDs)  for  articles,
  58. reports, books, letters, notes, slides (or overhead  transparencies),
  59. bibliographies, and  manual pages.    Except  for manual  pages,  the
  60. document types have  been heavily  influenced by  the LaTeX  document
  61. types of the  same names  [2], so  LaTeX users should  feel right  at
  62. home.   Indeed,  we presently  translate most  qwertz documents  into
  63. LaTeX for printing and the LaTeX produced is quite readable by anyone
  64. familiar with LaTeX.
  65.   : ::
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.                                   1
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. Chapter 2
  109.  
  110.  
  111.  
  112. The qwertz Document Type Definition
  113.  
  114.  
  115.  
  116. :::
  117.   We will be making use of several parameter entities in this DTD:
  118. ______________________________________________________________________
  119.  
  120. <!entity % emph
  121.         " em _ it _ bf _ sf _ sl _ tt " >
  122.  
  123. <!entity % inline
  124.         " f _ x _ %emph; _ sq _ label _ ref _
  125.           pageref _ cite _ ncite " >
  126.  
  127. ______________________________________________________________________
  128.   : ::
  129.  
  130.  
  131. 2.1 General Purpose Entities and Elements
  132.  
  133. :::
  134.   When may it  be necessary to use of an entity reference  to produce
  135. some character?  There are three cases to watch out for:
  136.  
  137. SGML Concrete Syntax Delimiters.
  138.  
  139.     Although the SGML  standard allows alternative concrete  syntaxes
  140.     to be defined, we use the so-called reference concrete  syntax in
  141.     the qwertz document types.  :::
  142.  
  143. SGML Short Reference Delimiters.
  144.  
  145.     In  SGML document  types  short  reference maps  may  be  defined
  146.     which allow  single characters to  be interpreted as  arbitrarily
  147.     complex sequences of  characters, including SGML tags and  entity
  148.     references.  :::
  149.  
  150.  
  151.     " # % ' ( ) * + , - : ; = @ [ ] ^ ` { _ } ~
  152.  
  153.  
  154.  
  155.  
  156.                                   2
  157.  
  158.  
  159. Spacing, Dashes and Ellipsis                                        3
  160.  
  161.  
  162.  
  163.              AElig   AE |Aacute 'A |Acirc  ^A |Ae
  164.              Ntilde  ~N |Oacute 'O |Ocirc  ^O |Oe
  165.              Ue        |Ugrave  `U |Uuml   "U |Yacute 'Y
  166.              aacute  'a |acirc  ^a |ae     "a |aelig  ae
  167.              oe      "o |ograve `o |oslash o |otilde  ^o
  168.              sz        |szlig   ss |thinsp   |tilde   ~
  169.              times   x |uacute  'u |ucirc  ^u |ue     "u
  170.  
  171.  
  172.             Table 2.1:  (Some) General Purpose Characters
  173.  
  174.  
  175.     For each of these  characters, there is an SGML entity which  may
  176.     be used to generate the ASCII character in the  printed document,
  177.     listed in table  2.1.  Usually, it  will not be necessary to  use
  178.     these entities;  the character  can simply be  typed and will  be
  179.     interpreted literally.  However, :::
  180.  
  181. TeX Special Characters.
  182.  
  183.     Ideally, it  should be possible  to hide  the conventions of  the
  184.     underlying formatting system completely.   In fact, SGML  parsers
  185.     which implement the full ISO standard have a feature  which makes
  186.     this possible.  :::
  187.  
  188. 2.1.1 Spacing, Dashes and Ellipsis
  189.  
  190. :::
  191.   There are  also three different kinds of dashes:  hyphen which  was
  192. already mentioned above, is to be  used for intra-word dashes, as  in
  193. the word ``intra-word''.(1)
  194.   : ::
  195.  
  196. 2.1.2 Foreign Characters
  197.  
  198. There are  a  large  set  of  entities  for  other  Western  European
  199. languages.   Altogether, there  are entities  for almost  all of  the
  200. foreign language characters in  ISO 8859, the  Latin 1 character  set
  201. for Western European languages.(2)  :::
  202.   : ::
  203.  
  204. 2.1.3 Sentences, Paragraphs, Footnotes and Emphasis
  205.  
  206. :::
  207.  
  208. ---------------------------
  209.  1. However, the hyphen  entity was not  actually necessary here,  as
  210. the -  character  was not  being  used in  this  context as  a  short
  211. reference.
  212.  2. Only the four Icelandic characters are missing.
  213.  
  214.  
  215. Lists                                                               4
  216.  
  217.   Sentences  or phrases  within  paragraphs can  be emphasized  in  a
  218. number of ways.   The em tag  is used to  choose the default form  of
  219. emphasis, which is usually italic type,  but depends on the style  of
  220. the background text.  If the background text is formatted  in italics
  221. type, as it usually is  in definitions, for example, than  emphasized
  222. text will  be formatted  using a  plain, roman  typeface.    However,
  223. various forms of emphasis can be  explicitly chosen.  These  include:
  224. bold face (bf),  italics (it),  sans  serif (sf),  slanted (sl),  and
  225. typewriter (tt) styles.
  226.   : ::
  227.   Long quotes are formatted in LaTeX by indenting  the left and right
  228. margins.  For example, [2, pp.  xiii]:
  229.  
  230.  
  231.      The  LaTeX document preparation system is a special version
  232.     of  Donald Knuth's  TeX program.    TeX  is  a sophisticated
  233.     program  designed   to  produce   high-quality  typesetting,
  234.     especially for mathematical text.  :::
  235.      LaTeX  represents a balance between  functionality and ease
  236.     of use.   Since I  implemented most of it  myself, there was
  237.     also a continual compromise between  what I wanted to do and
  238.     what I could do in a reasonable amount of time.  :::
  239.  
  240. 2.1.4 Lists
  241.  
  242. Three types of  lists are  supported, which differ  according to  the
  243. type of label used  to mark each item  in the list.   Use itemize  to
  244. create a list in which each item  is marked with some symbol such  as
  245. a dash or bullet.   The  enum tag is used  to create an  enumeration,
  246. i.e.  a list in which each item is labelled with a number (or letter)
  247. indicating its rank or position in the list.  Finally, use descrip to
  248. create a list in which each item is labelled by some tag of  your own
  249. choice.  Lists of various types can nested.  For example:
  250.   : ::
  251.  
  252.   o A level one item.
  253.  
  254.   o Here's level two
  255.  
  256.  
  257.      1. A level two item.
  258.  
  259.      2. Here's level three:
  260.  
  261.  
  262.         (a)  A level three item.
  263.  
  264.         (b)  Here's level four:
  265.  
  266.  
  267.              Red.
  268.  
  269.                  Is the color of my true love's hair.
  270.  
  271.  
  272. Lists                                                               5
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.                    Figure 2.1:  An idraw Drawing
  290.  
  291.  
  292.              Blue.
  293.  
  294.                  Is a property of some movies.
  295.  
  296.              Yellow.
  297.  
  298.                  Characterizes some forms of journalism.
  299.  
  300.  
  301.         (c)  A last level three item
  302.  
  303.  
  304.      3. A last level two item
  305.  
  306.  
  307.   o A last level one item.
  308.  
  309.   : ::
  310.  
  311. 2.1.5 Figures and Tables
  312.  
  313. Encapsulated PostScript graphics  can be created  using a variety  of
  314. different editors.  If you are using Unix with an X11-based graphical
  315. user-interface, you may want to try idraw, which stores its documents
  316. directly as  Encapsulated  PostScript  files.    Another  interesting
  317. X11-based drawing program is tgif.
  318.   : ::
  319.   Which would then appear as in figure 2.1.
  320.  
  321.  
  322. 2.1.6 Literate Programming
  323.  
  324. The original  motivation behind  the  development of  these  document
  325. types was to  create an  environment for literate  programming in  an
  326. arbitrary programming language similar  to Donald Knuth's WEB  system
  327. for literate programming in Pascal [1].  :::
  328.  
  329.  
  330. Lists                                                               6
  331.  
  332.   When formatted, spaces and line breaks are preserved:
  333.  
  334.  
  335. main ()
  336. {
  337.         /* This is the famous hello world program */
  338.  
  339.         printf("hello world\n");
  340. }
  341.  
  342. 2.1.7 Mathematical Formulas
  343.  
  344. The  qwertz   document   types  include   elements   for   describing
  345. mathematical formulas completely within  SGML, similar to the  system
  346. described in [3].  :::
  347.   So, for example,
  348.  
  349.                              nX     Z1
  350.                                 xi=    f
  351.                             i=1      0
  352.  
  353.   was typed as:
  354.  
  355. <dm>
  356.         <sum><ll>i=1<ul>n<opd>x<inf>i</></sum> =
  357.         <in><ll>0<ul>1<opd>f</in>
  358. </dm>
  359.  
  360.   : ::
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372. Bibliography
  373.  
  374.  
  375.  
  376. [1] Donald  E. Knuth.  Literate  Programming. The  Computer  Journal,
  377.     27(2):97--111, 1984.
  378.  
  379. [2] Leslie Lamport.  LaTeX, A  Document Preparation System.  Addison-
  380.     Wesley, 1986.
  381.  
  382. [3] A.  Scheller,  C.  Smith,  C.  Fuhrhop,  and  E.  Wilde.  DAPHNE:
  383.     Document  Application  Processing  in  a   Heterogeneous  Network
  384.     Environment.  Technical report,  Deutsches Forschungsnetz  (DFN),
  385.     April 1989.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.                                   7
  421.